﻿@model HomeDetailsViewModel
@{
    ViewBag.Title = "学生详情页";
    var photoPath = $"~/images/{Model.Student.PhotoPath??"tiger.jpg"}";
}

@*<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>*@
@*<h3>@ViewData["PageTitle"]</h3>
    
    @{
        var student = ViewData["Student"] as  Student;
    }
    
    <div>
        姓名：@student.Name
    </div>
    <div>
        邮箱：@student.Email
    </div>    
    <div>
        班级名称：@student.ClassName
    </div>*@

@*<h3>@ViewBag.PageTitle</h3>

<div>
    姓名：@ViewBag.Student.Name
</div>
<div>
    邮箱：@ViewBag.Student.Email
</div>    
<div>
    班级名称：@ViewBag.Student.ClassName
</div>*@

    @*<h3>@Model.PageTitle</h3>
<div>
    姓名：@Model.Student.Name
</div>
<div>
    邮箱：@Model.Student.Email
</div>    
<div>
    班级名称：@Model.Student.ClassName
</div>*@

@*@section Scripts{
    <script src="~/js/CustomScripts.js"></script>
}*@

<div class="row justify-content-center m-3">
    <div class="col-sm-8">
        <div class="card">
            <div class="card-header">
                <h1>@Model.Student.Name</h1>
            </div>
            
            <div class="card-body text-center">
                <img class="card-img-top" src="@photoPath" asp-append-version="true"/>
                <h4>学生ID：@Model.Student.Id</h4>
                <h4>邮箱：@Model.Student.Email</h4>
                <h4>班级名称：@Model.Student.ClassName</h4>
            </div>
            <div class="card-footer text-center">
                <a asp-controller="Home" asp-action="Index" class="btn btn-primary">返回</a>
                <a href="#" class="btn btn-primary">编辑</a>
                <a href="#" class="btn btn-danger">删除</a>
            </div>
        </div>
    </div>
</div>

@*</body>
</html>*@